package com.yu.crm.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 用户行为记录表
 *
 * @author song
 * @since 2019-12-28
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="PubUserActionLog对象", description="用户行为记录表")
public class PubUserActionLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.NONE)
    private Long id;

    @ApiModelProperty(value = "用户ID")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "应用id ")
    @TableField("app_id")
    private Integer appId;

    @ApiModelProperty(value = "设备IP")
    @TableField("ip")
    private String ip;

    @ApiModelProperty(value = "行为类型 1:新增，2:删除，3:修改 4：查询 5：登录")
    @TableField("action_type")
    private Integer actionType;

    @ApiModelProperty(value = "菜单id")
    @TableField("menu_id")
    private String menuId;

    @ApiModelProperty(value = "页面地址")
    @TableField("page_url")
    private String pageUrl;

    @ApiModelProperty(value = "行为内容")
    @TableField("action_content")
    private String actionContent;

    @ApiModelProperty(value = "操作前内容")
    @TableField("before_act_content")
    private String beforeActContent;

    @ApiModelProperty(value = "操作前内容")
    @TableField("after_act_content")
    private String afterActContent;

    @ApiModelProperty(value = "创建时间")
    @TableField("gmt_create")
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @TableField("gmt_modified")
    private LocalDateTime gmtModified;

    @ApiModelProperty(value = "是否已删除 yes_no")
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value = "用户名")
    @TableField(exist = false)
    private String userName;

    @ApiModelProperty(value = "应用名")
    @TableField(exist = false)
    private String appName;

    @ApiModelProperty(value = "部门名称")
    @TableField(exist = false)
    private String departmentName;

    @ApiModelProperty(value = "岗位名称")
    @TableField(exist = false)
    private String positionName;

}
